#ifndef PORT_H
#define PORT_H

class port
{
private:
    std::set<abstract_observer*> observers;

public:
    bool register_observer(abstract_observer* ob)
    {
        return observers.insert(ob).second;
    }

    void notify(message::msg_handle& msg)
    {
        for (auto ob : observers) {
            ob.receive(msg);
        }
    }

};

#endif // PORT_H

